package com.magenta.maxoptra.gis.distancematrix.builder;

import com.magenta.maxoptra.gis.GeoProviderSettings;
import com.magenta.maxoptra.gis.GeoProviderStatus;
import com.magenta.maxoptra.gis.GeographicCoordinates;
import com.magenta.maxoptra.gis.commons.Pair;
import com.magenta.maxoptra.gis.distancematrix.RoutesIterator;
import com.magenta.maxoptra.gis.distancematrix.UpdateResultType;

import java.util.List;

/**
 * @author Sergey Grachev
 */
public class MatrixBuildTaskListenerAdapter<ID> implements MatrixBuildTaskListener<ID> {
    @Override
    public MatrixBuildTask.Settings onFetchSettings(final ID groupId) {
        return null;
    }

    @Override
    public RoutesIterator onFetchCoordinates(final ID groupId) {
        return null;
    }

    @Override
    public GeoProviderStatus onUpdateRoute(final GeoProviderSettings settings,
                                           final Pair<? extends GeographicCoordinates, ? extends GeographicCoordinates> route,
                                           final boolean highPriority) {
        return GeoProviderStatus.idle();
    }

    @Override
    public GeoProviderStatus onUpdateRoute(final GeoProviderSettings settings, final GeographicCoordinates from,
                                           final List<? extends GeographicCoordinates> to, final boolean highPriority) {
        return GeoProviderStatus.idle();
    }

    @Override
    public void onFinishGroup(final ID groupId, final UpdateResultType resultType) {
    }

    @Override
    public void onProgress(final ID groupId, final long total, final long progress) {
        //
    }

    @Override
    public boolean onCheckIsGroupActive(final ID groupId) {
        return true;
    }

    @Override
    public void onFinishForCoordinate(final ID groupId, final GeographicCoordinates coordinate,
                                      final RoutesIterator.Type routeType, final long providerCid, final boolean hasErrors) {
        //
    }
}
